Skip to main content

HTML Introduction

本篇內容大多來自 w3.org

The simplest and most reliable doctype declaration to use is the one defined in HTML5:

<!DOCTYPE html>

簡而言之是 HTML5 的 DTD(Document Type Definition),如果要使用更之前的版本就不是這個寫法了

The head element represents a collection of metadata for the Document. As the first element in an html element.

<head>

DOM

The Document Object Model (DOM) connects web pages to scripts or programming languages by representing the structure of a document—such as the HTML representing a web page—in memory. _MDN

HTML DOM

The HTML DOM API provides access to various browser features such as tabs and windows, CSS styles and stylesheets, browser history, and so forth. These interfaces are discussed further in the HTML DOM API documentation. _MDN

When a web page is loaded, the browser creates a Document Object Model of the page.The HTML DOM model is constructed as a tree of Objects. _W3SCHOOLS

參考資料 1: DTD

參考資料 2: head element

參考資料 3: DOM